/*
 *  Copyright 2012, Tera-soft Co., Ltd.  All right reserved.
 *
 *  THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF TERA-SOFT CO.,
 *  LTD.  THE CONTENTS OF THIS FILE MAY NOT BE DISCLOSED TO THIRD
 *  PARTIES, COPIED OR DUPLICATED IN ANY FORM, IN WHOLE OR IN PART,
 *  WITHOUT THE PRIOR WRITTEN PERMISSION OF TERA-SOFT CO., LTD
 *
 */
package com.tera.sys.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.tera.sys.dao.BulletinDaoMapper;
import com.tera.sys.model.Bulletin;
import com.tera.sys.service.BulletinService;
/**
 * @author wy
 *
 */
@Service
public class BulletinServiceImpl implements BulletinService {

	/**
	 * bulletin dao
	 */
	@Autowired
	private BulletinDaoMapper bulletinDao;

	@Override
	@Transactional
	public void addBulletin(Bulletin bulletin) {
		this.bulletinDao.addBulletin(bulletin);
	}

	@Override
	@Transactional
	public void deleteBulletinByIDs(int[] ids) {
		this.bulletinDao.deleteBulletinByIDs(ids);
	}

	@Override
	public Bulletin getBulletinById(int id) {
		return this.bulletinDao.getBulletinById(id);
	}

	@Override
	public int getBulletinCount(Map<String, Object> map) {
		return this.bulletinDao.getBulletinCount(map);
	}

	@Override
	public List<Bulletin> queryBulletin(Map<String, Object> map) {
		return this.bulletinDao.queryBulletin(map);
	}

	@Override
	@Transactional
	public void updateBulletin(Bulletin bulletin) {
		this.bulletinDao.updateBulletin(bulletin);
	}
	@Override
	public Bulletin getBulletinByLast() {
		return this.bulletinDao.getBulletinByLast();
	}
}
